home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0429.dms / q0429.adf / libray / libimage / Makefile.SH < prev   
Makefile  |  1991-08-08  |  2KB  |  62 lines

  1. case $CONFIG in
  2. '')
  3.     if test ! -f config.sh; then
  4.     ln ../config.sh . || \
  5.     ln ../../config.sh . || \
  6.     ln ../../../config.sh . || \
  7.     (echo "Can't find config.sh."; exit 1)
  8.     fi
  9.     . config.sh
  10.     ;;
  11. esac
  12. : This forces SH files to create target in same directory as SH file.
  13. : This is so that make depend always knows where to find SH derivatives.
  14. case "$0" in
  15. */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  16. esac
  17. echo "Extracting libimage/Makefile (with variable substitutions)"
  18. : This section of the file will have variable substitutions done on it.
  19. : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
  20. : Protect any dollar signs and backticks that you do not want interpreted
  21. : by putting a backslash in front.  You may delete these comments.
  22. $spitshell >Makefile <<!GROK!THIS!
  23. OPTIMIZE = $optimize
  24. CCFLAGS = $ccflags $large
  25. RANLIB = $ranlib
  26. CC = $cc
  27. MKDEP = $mkdep
  28. URTINC = $urtinc
  29.  
  30. !GROK!THIS!
  31.  
  32. : In the following dollars and backticks do not need the extra backslash.
  33. $spitshell >>Makefile <<'!NO!SUBS!'
  34. LIB = ../libray.a
  35. INCLUDE = -I.. -I../.. $(URTINC)
  36. CFLAGS = $(CCFLAGS) $(INCLUDE) $(OPTIMIZE)
  37. SHELL = /bin/sh
  38.  
  39. OFILES = image.o
  40. CFILES = image.c
  41.  
  42.  
  43. $(LIB): $(OFILES)
  44.     ar cur $(LIB) $(OFILES)
  45.     $(RANLIB) $(LIB)
  46.  
  47. clean:
  48.     rm -f $(OFILES)
  49.  
  50. depend:
  51.     (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
  52.      $(MKDEP) $(CFILES) | sed 's/: \.\//: /; /\/usr\/include/d' \
  53.     ) >Makefile.new
  54.     cp Makefile Makefile.bak
  55.     cp Makefile.new Makefile
  56.     rm -f Makefile.new
  57.  
  58. # DO NOT DELETE THIS LINE
  59. !NO!SUBS!
  60. chmod 755 Makefile
  61. $eunicefix Makefile
  62.